package homework01;

public class ThreadDemo extends Thread{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + "在运行");
    }

    public static void main(String[] args) {
        ThreadDemo th = new ThreadDemo();
        Thread t1 = new Thread(th,"线程1");
        Thread t2 = new Thread(th,"线程2");
        t1.start();
        t2.start();
    }
}
